import request from '@/utils/request'

// 查询设备列表
export function listDevice(query) {
  return request({
    url: '/equipment/device/list',
    method: 'get',
    params: query
  })
}
// 查询设备列表
export function listDeviceAll(query) {
  return request({
    url: '/equipment/device/listAll',
    method: 'get',
    params: query
  })
}
// 查询设备详细
export function getDevice(id) {
  return request({
    url: '/equipment/device/' + id,
    method: 'get'
  })
}

// 新增设备
export function addDevice(data) {
  return request({
    url: '/equipment/device',
    method: 'post',
    data: data
  })
}

// 修改设备
export function updateDevice(data) {
  return request({
    url: '/equipment/device',
    method: 'put',
    data: data
  })
}

// 删除设备
export function delDevice(id) {
  return request({
    url: '/equipment/device/' + id,
    method: 'delete'
  })
}

// 导出设备
export function exportDevice(query) {
  return request({
    url: '/equipment/device/export',
    method: 'get',
    params: query
  })
}


// 还原设备
export function restore(ids) {
  return request({
    url: '/equipment/device/restore?ids=' + ids,
    method: 'delete'
  })
}
// 查询协议
export function queryDeal(query) {
  return request({
    url: '/equipment/device/deal',
    method: 'get',
    params: query
  })
}
  // 查询协议
  export function dealid(id) {
    return request({
      url: '/equipment/device/dealid?id=' + id,
      method: 'get',
    })
    }
// 删除info数据
export function deleteInfo(id) {
  return request({
    url: '/equipment/device/deleteDeviceInfo?id=' + id,
    method: 'get',
  })
}

